﻿using Sirenix.OdinInspector;
using UnityEngine;
using UnityEngine.UI;

namespace Assets.Content.Scripts.UI.GameScene
{
    internal class ButtonListPanel : Widget.Widget
    {
        [SerializeField, LabelText("状态按钮")]
        private Button _statsButton;

        [SerializeField, LabelText("角色信息")]
        private GameObject _playerInfoPanel;

        protected override void Awake()
        {
            base.Awake();
            _statsButton = transform.GetChild(0).GetComponent<Button>();
            _statsButton.onClick.AddListener(OnClickStatsButton);
        }

        private void OnClickStatsButton()
        {
            _playerInfoPanel.SetActive(!_playerInfoPanel.activeSelf);
        }
    }
}
